Skip to content

Conversation

@hakonhagland
Copy link
Contributor

@hakonhagland hakonhagland commented Aug 22, 2025

We need to extend the docstring extraction method to accommodate for multiple opm simulator python modules. Previously, there was only opm.simulators.BlackOilSimulator, now (see OPM/opm-simulators#6075) there will also be a GasWaterSimulator (and possibly more in the future). To avoid docstring duplication among the different simulators, a template system was implemented see OPM/opm-simulators#6418 and OPM/opm-python-documentation#17 for more information.

- Accept optional 5th parameter for simulator type
- Detect template format (with 'simulators' and 'common_methods' keys)
- Expand templates by replacing {{name}} and {{class}} placeholders
- Maintain backward compatibility for flat JSON format
- Generate simulator-specific docstring headers from single template
@hakonhagland
Copy link
Contributor Author

jenkins build this please

Copy link
Member

@akva2 akva2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. I wonder if the flat format is quickly turning into unused cruft, but we can keep it for now..

@akva2
Copy link
Member

akva2 commented Sep 12, 2025

jenkins build this opm-simulators=6418 please

@akva2
Copy link
Member

akva2 commented Sep 12, 2025

jenkins build this please

@blattms blattms merged commit 3982515 into OPM:master Sep 17, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants